/**
 * Symmetric Difference Function
 */

const diffArray = (arr1, arr2) => {
  const newArr1 = arr1.filter(num => !arr2.includes(num));
  const newArr2 = arr2.filter(num => !arr1.includes(num));
  return [...newArr1, ...newArr2];
}

console.log(diffArray(["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]));